home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 February / PCWorld_2006-02_cd.bin / software / topware / pspad / pspad450inst_cz.exe / {app} / Context / SAS.def < prev    next >
Text File  |  2005-09-24  |  11KB  |  441 lines

  1. ; PSPad code template for SAS
  2. ; Created by JSK okt 2003
  3. ;
  4.  
  5. [Macro definition]
  6. %TableName%=@E Table name:,,,,
  7. %Package%=@E Package:,,,,
  8. %Author%=@E Author:,,,,
  9. %Date%=@D Date:,,,,
  10. ;
  11. ;
  12. [COMMENT |r COMMENT BLOCK]
  13. /*
  14. */
  15. [IF | IF  END IF]
  16. IF | THEN
  17. END IF;
  18. [IFE | IF ELSE END IF]
  19. IF | THEN
  20.   NULL;
  21. ELSE
  22.   NULL;
  23. END IF;
  24. [IFI | IF ELSIF  END IF]
  25. IF | THEN
  26.   NULL;
  27. ELSIF THEN
  28.   NULL;
  29. ELSIF THEN
  30.   NULL;
  31. ELSIF THEN
  32.   NULL;
  33. ELSE
  34. END IF;
  35. [FOR iCnt | FOR iCnt IN .. LOOP]
  36. FOR iCnt IN |.. LOOP
  37. END LOOP;
  38. [FOR o | FOR o IN (SELECT LOOP]
  39. FOR o| IN  ( SELECT
  40.            )
  41. LOOP
  42.   NULL;
  43. END LOOP;
  44. ;
  45. ;
  46. --------------------------------------------------------------------------------
  47. [PROC SORT |m PROC SORT]*CTRL+ALT+S
  48. PROC SORT DATA=%TableName% <option(s)> <collating-sequence-option>;
  49.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n>;
  50. --------------------------------------------------------------------------------
  51. [PROC APPEND |m PROC APPEND]*CTRL+ALT+A
  52. PROC APPEND BASE=<libref.>SAS-data-set
  53.     <DATA=<libref.>SAS-data-set>
  54.     <FORCE>
  55.     <APPENDVER=V6>;
  56. --------------------------------------------------------------------------------
  57. [PROC COMPARE |m PROC COMPARE]*CTRL+ALT+C
  58. PROC COMPARE <option(s)>;
  59.     BY <DESCENDING> variable-1
  60.     <...<DESCENDING> variable-n>
  61.     <NOTSORTED>;
  62.  
  63.     ID <DESCENDING> variable-1
  64.     <...<DESCENDING> variable-n>
  65.     <NOTSORTED>;
  66.  
  67.      VAR variable(s);
  68.  
  69.      WITH variable(s);
  70. --------------------------------------------------------------------------------
  71. [PROC CONTENTS |m PROC CONTENTS]*
  72. PROC CONTENTS < option(s) >;
  73. --------------------------------------------------------------------------------
  74. [PROC COPY |m PROC COPY]*
  75. PROC COPY OUT=libref-1 IN=libref-2
  76.     <CLONE|NOCLONE>
  77.     <CONSTRAINT=YES|NO>
  78.     <DATECOPY>
  79.     <INDEX=YES|NO>
  80.     <MEMTYPE=(mtype(s))>
  81.     <MOVE <ALTER=alter-password>>;
  82.  
  83.     EXCLUDE SAS-file(s)
  84.     </ MEMTYPE=mtype>;
  85.  
  86.      SELECT SAS-file(s)
  87.     </ <MEMTYPE=mtype>
  88.     <ALTER=alter-password>>;
  89.     /*
  90.     Note:   IN=libref-1 is required on PROC COPY, but is optional on the COPY
  91.     statement
  92.     */
  93. --------------------------------------------------------------------------------
  94. [PROC DATASETS |m PROC DATASETS]*
  95. PROC DATASETS < option(s) >;
  96.     AGE current-name related-SAS-file(s)
  97.     </ <ALTER=alter-password>
  98.     <MEMTYPE=mtype>>;
  99.  
  100.      APPEND BASE= <libref.>SAS-data-set
  101.         <APPENDVER=V6>
  102.         <DATA=<libref.>SAS-data-set>
  103.         <GENNUM=integer>
  104.         <FORCE>;
  105.  
  106.     AUDIT SAS-file-name <SAS-password>;
  107.         INITIATE;
  108.         <LOG < BEFORE_IMAGE=YES|NO>
  109.         <DATA_IMAGE=YES|NO>
  110.         <ERROR_IMAGE=YES|NO>>;
  111.         <USER_VAR=variable-1 <... variable-n>>;
  112.  
  113.         or
  114.  
  115.     AUDIT SAS-file-name <SAS-password><GENNUM= integer>;
  116.         SUSPEND|RESUME|TERMINATE;
  117.  
  118.      CHANGE old-name-1=new-name-1
  119.     <...old-name-n=new-name-n >
  120.     </ <ALTER=alter-password>
  121.     <GENNUM=ALL|integer>
  122.     <MEMTYPE=mtype>>;
  123.  
  124.      CONTENTS < option(s)>;
  125.  
  126.      COPY OUT=libref-1
  127.     <CLONE|NOCLONE>
  128.     <CONSTRAINT=YES|NO>
  129.     <IN=libref-2>
  130.     <INDEX=YES|NO>
  131.     <MEMTYPE=(mtype(s))>
  132.     <MOVE <ALTER=alter-password>;>
  133.  
  134.     EXCLUDE SAS-file(s) < / MEMTYPE=mtype>;
  135.  
  136.      SELECT SAS-file(s)
  137.     </ <ALTER=alter-password>
  138.     <MEMTYPE= mtype>>;
  139.  
  140.      DELETE SAS-file(s)
  141.     </ <ALTER=alter-password>
  142.     <GENNUM=ALL|HIST|REVERT|integer>
  143.     <MEMTYPE=mtype>>;
  144.  
  145.  
  146.      EXCHANGE name-1=other-name-1
  147.     <...name-n=other-name-n>
  148.     </ <ALTER=alter-password>
  149.     <MEMTYPE=mtype> >;
  150.  
  151.  
  152.      MODIFY SAS-file <(file-option(s))>
  153.     </ <GENNUM=integer> 
  154.     <MEMTYPE=mtype>>;  FORMAT variable-list-1 <format-1> 
  155.     <...variable-list-n <format-n>>;  
  156.     
  157.     IC CREATE <constraint-name>= (NOT NULL (variable) | 
  158.     CHECK(WHERE-expression) | 
  159.     PRIMARY KEY (variables) | 
  160.     UNIQUE (variables) | 
  161.     FOREIGN KEY (variables) REFERENCES <libref>.SAS-data-set 
  162.     <ON DELETE referential-action> <ON UPDATE referential-action>) 
  163.     <MESSAGE='message-string' <MSGTYPE=USER>>;  
  164.     
  165.     
  166.      IC DELETE constraint-name(s)| _ALL_;  
  167.     
  168.     
  169.      IC REACTIVATE foreign-key-name REFERENCES libref;  
  170.     
  171.     
  172.      INDEX CENTILES index(s) 
  173.     </ <REFRESH>
  174.     <UPDATECENTILES= 
  175.     ALWAYS|NEVER|integer> >;
  176.  
  177.     
  178.      INDEX CREATE index-specification(s) 
  179.     </ <NOMISS> 
  180.     <UNIQUE> 
  181.     <UPDATECENTILES= 
  182.     ALWAYS|NEVER|integer>>;  
  183.     
  184.     
  185.      INDEX DELETE index(s)|_ALL_;  
  186.     
  187.     
  188.      INFORMAT variable-list-1 <informat-1> 
  189.     <...variable-list-n <informat-n>>;  
  190.     
  191.     
  192.      LABEL variable-1=<'label-1'|' '> 
  193.     <...variable-n=<'label-n'|' ' >>;  
  194.     
  195.     
  196.      RENAME old-name-1=new-name-1 
  197.     <...old-name-n=new-name-n>;  
  198.     
  199.     
  200.      
  201.     
  202.     
  203.      REPAIR SAS-file(s) 
  204.     </ <ALTER=alter-password>
  205.     <GENNUM=integer>
  206.     <MEMTYPE=mtype>>;
  207.  
  208.  
  209.      SAVE SAS-file(s) </ MEMTYPE=mtype>;
  210. --------------------------------------------------------------------------------
  211. [PROC EXPORT |m PROC EXPORT]*
  212. PROC EXPORT DATA=SAS-data-set
  213.     OUTFILE="filename" | OUTTABLE="tablename"
  214.     <DBMS=identifier> <REPLACE>;  < data-source-statements;>
  215.  
  216. --------------------------------------------------------------------------------
  217. [PROC FORMAT |m PROC FORMAT]*
  218. PROC FORMAT <option(s)>;  EXCLUDE entry(s);
  219.  
  220.     INVALUE <$>name <(informat-option(s))> value-range-set(s);
  221.  
  222.     PICTURE name <(format-option(s))>
  223.     value-range-set-1 <(picture-1-option(s) )>
  224.     <...value-range-set-n <(picture-n-option(s))>>;
  225.  
  226.     SELECT entry(s);
  227.  
  228.     VALUE <$>name <(format-option(s))> value-range-set(s);
  229. --------------------------------------------------------------------------------
  230. [PROC FREQ |m PROC FREQ]*
  231. PROC FREQ <option(s)>;  BY <DESCENDING> variable-1 <...<DESCENDING> variable-n>
  232.     <NOTSORTED>;
  233.  
  234.     EXACT statistic-keyword(s) </ option(s)>;
  235.  
  236.     OUTPUT statistic-keyword(s) <OUT=SAS-data-set>;
  237.  
  238.     TABLES request(s) </ option(s)>;
  239.  
  240.     TEST statistic-keyword(s);
  241.  
  242.     WEIGHT variable;
  243. --------------------------------------------------------------------------------
  244. [PROC IMPORT |m PROC IMPORT]*
  245. PROC IMPORT
  246.     DATAFILE="filename" | TABLE="tablename"
  247.     OUT=SAS-data-set
  248.     <DBMS=identifier><REPLACE>;  < data-source-statements;>
  249.     
  250. --------------------------------------------------------------------------------
  251. [PROC MEANS |m PROC MEANS]*
  252. PROC MEANS <option(s)> <statistic-keyword(s)>;
  253.     BY <DESCENDING> variable-1 <... <DESCENDING> variable-n><NOTSORTED>;
  254.  
  255.     CLASS variable(s) </ option(s)>;
  256.  
  257.     FREQ variable;
  258.  
  259.     ID variable(s);
  260.  
  261.     OUTPUT <OUT=SAS-data-set> <output-statistic-specification(s)>
  262.         <id-group-specification(s)> <maximum-id-specification(s)>
  263.         <minimum-id-specification(s)> </ option(s)> ;
  264.  
  265.     TYPES request(s);
  266.  
  267.     VAR variable(s) < / WEIGHT=weight-variable>;
  268.  
  269.     WAYS list;
  270.  
  271.     WEIGHT variable;
  272.  
  273. --------------------------------------------------------------------------------
  274. [PROC PRINT |m PROC PRINT]*
  275. PROC PRINT < option(s)>;
  276.     BY < DESCENDING> variable-1  <...< DESCENDING> variable-n>< NOTSORTED>;
  277.  
  278.     PAGEBY BY-variable;
  279.  
  280.     SUMBY BY-variable;
  281.  
  282.     ID variable(s);
  283.  
  284.     SUM variable(s);
  285.  
  286.     VAR variable(s);
  287.  
  288. --------------------------------------------------------------------------------
  289. [PROC REPORT |m PROC REPORT]*
  290. PROC REPORT <option(s)>;
  291.     BREAK location break-variable</ option(s)>;
  292.  
  293.     BY <DESCENDING> variable-1
  294.     <...<DESCENDING> variable-n> <NOTSORTED>;
  295.  
  296.     COLUMN column-specification(s);
  297.  
  298.     COMPUTE location <target>
  299.         </ STYLE=<style-name> <[style-attribute-specification(s)]>>;
  300.  
  301.         LINE specification(s);
  302.  
  303.         /* ... select SAS language elements ... */
  304.  
  305.     ENDCOMP;
  306.     
  307.     COMPUTE report-item </ type-specification>;
  308.         CALL DEFINE (column-id, 'attribute-name', value);
  309.  
  310.         /* ... select SAS language elements ... */
  311.  
  312.     ENDCOMP;
  313.  
  314.     DEFINE report-item / <usage>
  315.         <attribute(s)>
  316.         <option(s)>
  317.         <justification>
  318.         <COLOR=color>
  319.         <'column-header-1' <...'column-header-n'>>
  320.         <style>;
  321.  
  322.     FREQ variable;
  323.  
  324.     RBREAK location </ option(s)>;
  325.  
  326.     WEIGHT variable;
  327.  
  328. --------------------------------------------------------------------------------
  329. [PROC SQL |m PROC SQL]*
  330. PROC SQL< option-list>;
  331.     ALTER TABLE alter-statement;
  332.  
  333.     CREATE create-statement;
  334.  
  335.     DELETE delete-statement;
  336.  
  337.     DESCRIBE describe-statement;
  338.  
  339.     DROP drop-statement;
  340.  
  341.     INSERT insert-statement;
  342.  
  343.     RESET <reset statement option-list>;
  344.  
  345.     SELECT select-statement;
  346.  
  347.     UPDATE update-statement;
  348.  
  349.     VALIDATE validate-statement;
  350.  
  351. --------------------------------------------------------------------------------
  352. [PROC SUMMARY |m PROC SUMMARY]*
  353. /*
  354. See the MEANS procedure syntax for details.
  355. */
  356. PROC SUMMARY <option(s)> <statistic-keyword(s)>;
  357.     BY <DESCENDING> variable-1<...<DESCENDING> variable-n> <NOTSORTED>;
  358.  
  359.     CLASS variable(s) </ option(s)>;
  360.  
  361.     FREQ variable;
  362.  
  363.     ID variable(s);
  364.  
  365.     OUTPUT <OUT=SAS-data-set><output-statistic-specification(s)>
  366.     <id-group-specification(s)> <maximum-id-specification(s)>
  367.     <minimum-id-specification(s)></ option(s)> ;
  368.  
  369.     TYPES request(s);
  370.  
  371.     VAR variable(s)</ WEIGHT=weight-variable>;
  372.  
  373.     WAYS list;
  374.  
  375.     WEIGHT variable;
  376.  
  377. --------------------------------------------------------------------------------
  378. [PROC TABULATE |m PROC TABULATE]*
  379. PROC TABULATE <option(s)>;
  380.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n> <NOTSORTED>;
  381.  
  382.     CLASS variable(s) </ options>;
  383.  
  384.     CLASSLEV variable(s) / STYLE=<style-element-name | <PARENT>> <[style-attribute-specification(s)] >;
  385.  
  386.     FREQ variable;
  387.  
  388.     KEYLABEL keyword-1='description-1' <...keyword-n='description-n'>;
  389.  
  390.     KEYWORD keyword(s) / STYLE =<style-element-name | <PARENT>> <[style-attribute-specification(s)] >;
  391.  
  392.     TABLE <<page-expression,> row-expression,> column-expression </ table-option(s)>;
  393.  
  394.     VAR analysis-variable(s)</ options>;
  395.  
  396.     WEIGHT variable;
  397.  
  398. --------------------------------------------------------------------------------
  399. [PROC TRANSPOSE |m PROC TRANSPOSE]*
  400. PROC TRANSPOSE <DATA=input-data-set> <LABEL=label> <LET>
  401.     <NAME=name> <OUT=output-data-set> <PREFIX=prefix>;
  402.     
  403.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n> <NOTSORTED>;
  404.  
  405.     COPY variable(s);
  406.  
  407.     ID variable;  IDLABEL variable;
  408.  
  409.     VAR variable(s);
  410.  
  411. --------------------------------------------------------------------------------
  412. [PROC UNIVARIATE |m PROC UNIVARIATE]
  413. PROC UNIVARIATE <option(s)>;
  414.     BY <DESCENDING> variable-1 <...<DESCENDING> variable-n> <NOTSORTED>;
  415.  
  416.     CLASS variable-1<(variable-option(s))> <variable-2<(variable-option(s))>>
  417.         </ KEYLEVEL= 'value1'|('value1' 'value2')>;
  418.  
  419.     FREQ variable;
  420.  
  421.     HISTOGRAM <variable(s)> </ option(s)>;
  422.  
  423.     ID variable(s);
  424.  
  425.     INSET <keyword(s)> </ option(s)>;
  426.  
  427.     OUTPUT <OUT=SAS-data-set>
  428.         statistic-keyword-1=name(s)
  429.         <... statistic-keyword-n=name(s)>
  430.         <percentiles-specification>;
  431.  
  432.     PROBPLOT <variable(s)> </ option(s)>;
  433.  
  434.     QQPLOT <variable(s)> </ option(s)>;
  435.  
  436.     VAR variable(s);
  437.  
  438.     WEIGHT variable;
  439. --------------------------------------------------------------------------------
  440.